using System.Collections;
using System.Collections.Generic;
using Cinemachine;
using UnityEngine;

public class TransporterTrigger : TriggerBase
{
    [SerializeField] private CinemachineVirtualCamera _targetSwitchCamera;
    protected override void OnTriggerEnter2D(Collider2D other)
    {
        base.OnTriggerEnter2D(other);

        if (other.CompareTag("PlayerBullet") == false)
            return;

        Player.Instance.transform.position = transform.position;
        
        EventCenter.TriggerEvent(EventName.SwitchViewState, ViewType.Side);

        CameraManager.Instance.SwapCamera(_targetSwitchCamera);
    }
}
